#yjs

def rgb(x, y, z):
    result = ""
    for v in [x, y, z]:
	if v < 0:
	    result += '00'
	elif v > 255:
	    result += 'ff'
	else:
	    if len(str(hex(v))[2:]) == 1:
		result += '0'+str(hex(v))[2:]
	    else:
		result += str(hex(v))[2:]
    print(result) 
rgb(1000, 12, 34)
